package com.xzl.org.learning_situation_analysis.controller;

import com.xzl.org.learning_situation_analysis.entity.QuestionScore;
import com.xzl.org.learning_situation_analysis.entity.User;
import com.xzl.org.learning_situation_analysis.entity.acceptBean.AcceptPaper;

import com.xzl.org.learning_situation_analysis.service.QuestionScoreService;
import com.xzl.org.learning_situation_analysis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 夏智力
 * @FileName testController
 * @date 2022/4/12 22:41
 * @Software: IntelliJ IDEA
 */
@RestController
public class testController {
    @Autowired
    private UserService userService;

    @PostMapping("/t")
    public Object test(@RequestBody AcceptPaper acceptPaper){

        System.out.println("111111111111111111111111");

        System.out.println(acceptPaper.toString());

        return new Object();
    }

    @PostMapping("/test1")
    public void test() {
        User user = new User();
        user.setUserName("2154121");
        user.setName("xsd");
        user.setPassword("123456");
        user.setGradeId(1);
        user.setClazzId(1);
        user.setPhoneNumber("1546482");
        System.out.println(user);
        userService.insertUser(user);
    }
}
